<!-- 新闻 -->
<div class="panel panel-success" style="margin:1% 1% 1% 1%;">
    <div class="panel-heading">
        <h3 class="panel-title">新闻栏目</h3>
    </div>

    <div class="panel-body">
        <div class="news-list">
            <?php
            global $m;
            $osq = $m->query("SELECT `title`, `time`, `comment_num`, `news_url`, `img_url`, `id` FROM `w_news`");

            while ($row = $osq->fetch_array()) {
                ?>
                <div class="ip-item ip-default-item">
                    <div class="l">
                        <img alt="<?php echo $row['title']; ?>" src="<?php echo $row['img_url']; ?>">
                    </div>
                    <div class="r">
                        <p class="title">
                            <a href="<?php echo $row['news_url']; ?>" target="_blank"><?php echo htmlspecialchars($row['title']); ?></a>
                        </p>
                        <div class="ip-item-info">
                            <span class="date"><?php echo $row['time']; ?></span>
                            <div class="r">
                                <span class="comment"><?php echo $row['comment_num']; ?>评论</span>
                            </div>
                        </div>
                    </div>
                </div>
            <?php } ?>

        </div>
    </div>
</div>